ci,Justfile: fix building with the right stream
authorEtienne Champetier <e.champetier@ateme.com>
Fri, 10 Oct 2025 22:26:53 +0000 (18:26 -0400)
committerEtienne Champetier <e.champetier@ateme.com>
Fri, 10 Oct 2025 22:41:13 +0000 (18:41 -0400)
Part of the `e2e (stream10)` was running stream9.

As `just` doesn't support named parameters yet,
use `STREAM` env var to select between stream9 and stream10

.github/workflows/bootc.yaml
Justfile

index 6104d803c8a0b4798f68dfcf900b4aeed72f8e35..914780de79450e101952dce59c367a42e037d729 100644 (file)
@@ -32,11 +32,11 @@ jobs:
           sudo apt update
           sudo apt install -y crun/testing podman/testing skopeo/testing
       - name: build
-        run: sudo just build --build-arg=base=quay.io/centos-bootc/centos-bootc:${{ matrix.stream }}
+        run: sudo STREAM=${{ matrix.stream }} just build
       - name: unitcontainer
-        run: sudo just unitcontainer
+        run: sudo STREAM=${{ matrix.stream }} just unitcontainer
       - name: unittest
-        run: sudo just unittest
+        run: sudo STREAM=${{ matrix.stream }} just unittest
       - name: bootc install
         run: |
           set -xeuo pipefail
index d46f6c0fc91eccac0e8d1b2b38add80c2acd07d4..c1316990b929819335723ebee35b813991ad831b 100644 (file)
--- a/Justfile
+++ b/Justfile
@@ -1,16 +1,22 @@
 # Detect the os for a workaround below
 osid := `. /usr/lib/os-release && echo $ID`
 
+stream := env('STREAM', 'stream9')
+build_args := "--jobs=4 --build-arg=base=quay.io/centos-bootc/centos-bootc:"+stream
+
 # Build the container image from current sources
 build *ARGS:
-    podman build --jobs=4 -t localhost/ostree {{ARGS}} .
+    podman build {{build_args}} -t localhost/ostree {{ARGS}} .
 
 build-unittest *ARGS:
-    podman build --jobs=4 --target build -t localhost/ostree-buildroot {{ARGS}} .
+    podman build {{build_args}} --target build -t localhost/ostree-buildroot {{ARGS}} .
 
 # Do a build but don't regenerate the initramfs
 build-noinitramfs *ARGS:
-    podman build --jobs=4 --target rootfs -t localhost/ostree {{ARGS}} .
+    podman build {{build_args}} --target rootfs -t localhost/ostree {{ARGS}} .
+
+unitcontainer-build *ARGS:
+    podman build {{build_args}} --target bin-and-test -t localhost/ostree-bintest {{ARGS}} .
 
 # We need a filesystem that supports O_TMPFILE right now (i.e. not overlayfs)
 # or ostree hard crashes in the http code =/
@@ -33,8 +39,6 @@ unittest-shell: build-unittest
 # For some reason doing the bind mount isn't working on at least the GHA Ubuntu 24.04 runner
 # without --privileged. I think it may be apparmor?
 unitpriv := if osid == "ubuntu" { "--privileged" } else { "" }
-unitcontainer-build:
-    podman build --jobs=4 --target bin-and-test -t localhost/ostree-bintest .
 unitcontainer: unitcontainer-build 
     # need cap-add=all for mounting
     podman run --rm --net=none {{unitpriv}} {{unittest_args}} --cap-add=all --env=TEST_CONTAINER=1 localhost/ostree-bintest /tests/run.sh
@@ -59,4 +63,4 @@ clang-format:
 
 # Check source files against clang-format defaults
 clang-format-check:
-    {{sourcefiles}} | xargs clang-format -i --Werror --dry-run
\ No newline at end of file
+    {{sourcefiles}} | xargs clang-format -i --Werror --dry-run